package com.cykj.eurekaclient.mapping;

import com.cykj.eurekaclient.bean.*;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Repository;


import java.util.List;
import java.util.Map;

/**
 * @version 1.0
 * @author: 蜜糖
 * @date: 2021/9/19 9:00
 * @desc:
 */
@Repository
public interface UserMapper {

    /*
        站点配置相关方法
     */

    int selUserAll();

    public BackUser Login(BackUser user);
    public List<BackUser>find(RowBounds rowBounds);

    int selectCount();

    List<BackUser> findSite(RowBounds rowBounds, String name);

    /* 伟鹏的 */
    List<BackUser> findSite1(@Param(value = "rowBounds")RowBounds rowBounds,@Param(value = "name") String name);

    public List<FrontUser>Ffind(RowBounds rowBounds);
    public int FselUserAll();
    void FdeleteRow(Integer id);
    void FinsertSite(@Param(value = "frontUser") FrontUser frontUser);
    List<FrontUser> FfindSite(@Param(value = "rowBounds")RowBounds rowBounds,@Param(value = "name") String name);
    int FsiteCount(@Param(value = "name") String name);
    void FupdateRow(@Param(value = "accountState") String accountState,
                    @Param(value = "id") long id,
                    @Param(value = "password")String password);

    /* 伟鹏的 */
    int selectCount1();

    void deleteRow(Integer id);

    // 删除,伟鹏的
    void deleteRow1(Integer id);

    //修改，伟鹏的
    void updateRow1(@Param(value = "accountState") String accountState,
                   @Param(value = "id") long id,
                   @Param(value = "password")String password);


    int siteCount(@Param(value = "name") String name);

    /* 伟鹏的 */
    int siteCount1(@Param(value = "name") String name);

    // 增加，伟鹏的
    void insertSite1(@Param(value = "backUser") BackUser backUser);

    public List<Parameter>Pfind(RowBounds rowBounds);
    public int PselUserAll();
    void PdeleteRow(Integer id);
    List<Parameter> PfindSite(RowBounds rowBounds, String name);
    int PsiteCount(@Param(value = "name") String name);
    void PinsertSite(@Param(value = "parameter") Parameter parameter);
    void PupdateRow(@Param(value = "name") String name,
                    @Param(value = "id") long id,
                    @Param(value = "type")String type,
                    @Param(value = "parentId")long parentId);

    List<MenuInfo>qxgl();
    List<Parameter> xlfind();


     /*
        站点配置相关方法
     */


    List<StationInfo> findSiteInfo(RowBounds rowBounds,@Param(value = "name")String name);


    void updateRow(@Param(value = "stationInfo") StationInfo stationInfo, @Param(value = "id") Long id);

    List<CityInfo> selCityExist(@Param(value = "cityStr") String cityStr,
                                @Param(value = "district") String district);


    void insertSite(@Param(value = "stationInfo") StationInfo stationInfo, @Param(value = "district")String district);

    List<StationInfo> findSiteNameInfo(@Param(value = "name") String name);

    List<StationInfo> findSiteInfo();

    List<StationInfo> findSiteName();

    List<StationInfo> findLng();

    List<StationInfo> findLat();

    /*
        线路配置相关方法
     */

    List<RouteInfo> getLineInfo(RowBounds rowBounds,@Param(value = "routeName") String routeName);

    int selectLineInfoCount();

    void deleteRouteRow(Integer id);

    void updateRouteRow(@Param(value = "routeInfo") RouteInfo routeInfo, @Param(value = "id") Long id);

    List<RouteInfo> findRoute(RowBounds rowBounds, String routeName);

    int routeCount(@Param(value = "routeName") String routeName);

    void insertRoute(@Param(value = "routeInfo") RouteInfo routeInfo);

    List<RouteInfo> findRouteName(@Param(value = "routeName")String name);

    /*
        班车班次时刻表配置相关方法
     */

    List<RouteTimeNode> getBusTime(RowBounds rowBounds,@Param(value = "routeStr")String routeStr);

    int selectBusTimeCount(@Param(value = "routeStr")String routeStr);

    void deleteBusTimeRow(Integer id);

    List<RouteInfo> routeIdOptions();

    List<Parameter> timePOptions();

    List<Parameter> stateOptions();

    void insertBusTime(@Param(value = "routeTimeNode") RouteTimeNode routeTimeNode);

    void updateBusTimeRow(@Param(value = "routeStr") String routeStr,
                          @Param(value = "timeParagraphStr") String timeParagraphStr,
                          @Param(value = "timeNode") String timeNode,
                          @Param(value = "state") Object state,
                          @Param(value = "id") Long id);

    /*
        城市信息配置相关方法
     */

    List<RouteTimeNode> getCityInfo(RowBounds rowBounds,@Param(value = "name") String name);

    int selectCityInfoCount();

    void deleteCityInfoRow(Integer id);

    List<CityInfo> findCityName(RowBounds rowBounds, String name);

    int cityCount(@Param(value = "name") String name);

    void insertCity(@Param(value = "name")String name,
                    @Param(value = "parentName")String parentName,
                    @Param(value = "district")String district);

    List<CityInfo> findCityNameInfo(@Param(value = "name")String name);

    void updateCityRow(@Param(value = "name")String name,
                       @Param(value = "parentName")String parentName,
                       @Param(value = "district")String district,
                       @Param(value = "id")Long id);
    /*
        站点分配表配置相关方法
     */

    List<StationAssign> getTravelSite(RowBounds rowBounds,@Param(value = "routeStr")String routeStr);

    int selectTravelSiteCount(@Param(value = "routeStr")String routeStr);



    List<RouteInfo> routeNameOptions();

    List<StationInfo> stationOptions();

    void deleteTravelSiteRow(Integer id);

    void insertTravelSite(@Param(value = "routeStr")String routeStr,
                          @Param(value = "stationStr")String stationStr,
                          @Param(value = "sequence")Long sequence);

    List<StationAssign> findTravelSiteName(@Param(value = "stationStr")String stationStr,
                                           @Param(value = "sequence")Long sequence);

    void updateTravelSiteRow(@Param(value = "routeStr")String routeStr,
                             @Param(value = "stationStr")String stationStr,
                             @Param(value = "sequence")Long sequence,
                             @Param(value = "id")Long id);

    List<FrontUserFlowRecord> findCollectMoney();

    List<FrontUserFlowRecord> collectMoneyRoute();

    int allTakeIn();

}
